from openpyxl import load_workbook

table_name = "live_broadcast"
wb2 = load_workbook('%s.xlsx' % (table_name))
ws=wb2.get_sheet_names()
for row in wb2:
    for cell in row:
        if table_name == 'live_broadcast_circuit':
            updatesql = 'update %s set play_path = "%s" where id = %s ;' % (table_name, cell[5].value.replace("5506.liveplay.myqcloud.com", "liveplay.aiyinsitanfm.com"), cell[0].value)
        else:
            updatesql = 'update %s set flow_path = "%s" where id = %s ;' % (table_name, cell[8].value.replace("5506.livepush.myqcloud.com", "livepush.aiyinsitanfm.com"), cell[0].value)

        print(updatesql)

print("over...")
